package day4.Exer;

import java.util.Objects;

public class Staff {
    private String name,sex,job;
    private int age;
    private double salary;
    private String stNo;
    public Staff(){}
    public Staff(String name) {
        this.name = name;
    }

    public Staff(String name, String sex, String job, int age, double salary, String stNo) {
        this.name = name;
        this.sex = sex;
        this.job = job;
        this.age = age;
        this.salary = salary;
        this.stNo = stNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public String getStNo() {
        return stNo;
    }

    public void setStNo(String stNo) {
        this.stNo = stNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Staff staff = (Staff) o;
        return Objects.equals(stNo, staff.stNo);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stNo);
    }
}
